const
    http = require('http'),
    connect = require('connect'),
    app = connect(),
    bodyText = "hellow world";

let
    connectHello = null,
    server = null;

connectHello = function(request, response, next) {
    response.setHeader('content-length', bodyText.length);
    response.end(bodyText);
};

app
    .use(connectHello);
server = http.createServer(app);
server.listen(3000);

console.log('listening on port', server.address().port);